{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#Table of Contents\n", "* [1. Jupyter Project at Bryn Mawr: Help](#1.-Jupyter-Project-at-Bryn-Mawr:-Help)\n", "\t* [1.1 Changing your password](#1.1-Changing-your-password)\n", "\t* [1.2 Sharing your notebooks](#1.2-Sharing-your-notebooks)\n", "\t* [1.3 Copying shared notebooks](#1.3-Copying-shared-notebooks)\n", "\t* [1.4 Enabling other languages](#1.4-Enabling-other-languages)\n", "\t\t* [1.4.1 Enable Calico Scheme kernel](#1.4.1-Enable-Calico-Scheme-kernel)\n", "\t\t* [1.4.2 Enable Python 3 kernel](#1.4.2-Enable-Python-3-kernel)\n", "\t\t* [1.4.3 Enable Calico kernel](#1.4.3-Enable-Calico-kernel)\n", "\t\t* [1.4.4 Enable Julia kernel](#1.4.4-Enable-Julia-kernel)\n", "\t\t* [1.4.5 x Enable Octave (Matlab) kernel](#1.4.5-x-Enable-Octave-%28Matlab%29-kernel)\n", "* [2. Installing extensions](#2.-Installing-extensions)\n", "\t* [2.1 Spell Checking](#2.1-Spell-Checking)\n", "\t* [2.2 Document Tools](#2.2-Document-Tools)\n", "\t* [2.3 Cell Tools](#2.3-Cell-Tools)\n", "\t* [2.4 Easy install of notebook extensions](#2.4-Easy-install-of-notebook-extensions)\n", "* [3. Learning about...](#3.-Learning-about...)\n", "\t* [3.1 Notebook](#3.1-Notebook)\n", "\t* [3.2 Python](#3.2-Python)\n", "* [4. Known issues](#4.-Known-issues)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Jupyter Project at Bryn Mawr: Help" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Welcome to the Jupyter Project at Bryn Mawr College. Jupyter is an interface to write executable documents, reproducible research, documents with visualizations, and just explore computation.\n", "\n", "You can log into Jupyter here: http://jupyter.cs.brynmawr.edu\n", "\n", "Below you will find some help on getting started with Jupyter at Bryn Mawr College." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.1 Changing your password" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from calico.password import change_password" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A new password should have numbers and letters, composed of more than just dictionary words, and be of sufficient length. It may take more than one try to create a good password:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "change_password()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.2 Sharing your notebooks" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First, make a folder in your root directory:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! mkdir ~/Public" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next, make it readable by all:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! chmod a+r ~/Public" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, make the readability \"sticky\" so that all files created here will be readable by all:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! chmod g+s ~/Public" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "_Currently there is a bug in Jupyter: if you open and re-save your Public notebook, you'll have to reset the permissions. See [issue #6405](https://github.com/ipython/ipython/issues/6405)._" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.3 Copying shared notebooks" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! mkdir ~/Incoming" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! chmod a+w ~/Incoming" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.4 Enabling other languages" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.4.1 Enable Calico Scheme kernel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! mkdir -p ~/.ipython/kernels/calico_scheme_kernel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%file ~/.ipython/kernels/calico_scheme_kernel/kernel.json\n", "\n", "{\n", " \"argv\": [\"/usr/bin/python\", \n", " \"-m\", \"calico_scheme_kernel\", \n", " \"-f\", \"{connection_file}\"], \n", " \"display_name\": \"Scheme\", \n", " \"language\": \"scheme\"\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.4.2 Enable Python 3 kernel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! mkdir -p ~/.ipython/kernels/python3" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%file ~/.ipython/kernels/python3/kernel.json\n", "\n", "{\n", " \"display_name\": \"IPython (Python 3)\", \n", " \"language\": \"python\", \n", " \"argv\": [\n", " \"python3\", \n", " \"-c\", \"from IPython.kernel.zmq.kernelapp import main; main()\", \n", " \"-f\", \"{connection_file}\"\n", " ], \n", " \"codemirror_mode\": {\n", " \"version\": 2, \n", " \"name\": \"ipython\"\n", " }\n", "}\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.4.3 Enable Calico kernel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! git clone https://bitbucket.org/ipre/calico.git ~/Calico" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! cp ~/Calico/bin/linux/clrzmq.dll ~/Calico/bin/ " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! mkdir -p ~/.ipython/kernels/calico " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Replace USER below with your user id:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%file ~/.ipython/kernels/calico/kernel.json\n", "\n", "{\n", " \"argv\": [\"/usr/bin/mono\", \n", " \"/home/USER/Calico/bin/Calico.exe\",\n", " \"--nographics\", \n", " \"--server\", \"{connection_file}\"], \n", " \"display_name\": \"Calico\", \n", " \"language\": \"python\"\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.4.4 Enable Julia kernel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "! julia -e \"Pkg.add(\\\"IJulia\\\")\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Replace USER with your user id:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%file ~/.ipython/kernels/julia/kernel.json\n", "\n", "{\n", " \"display_name\": \"Julia\", \n", " \"language\": \"julia\", \n", " \"argv\": [\"/usr/bin/julia-basic\", \n", " \"-F\", \"/home/USER/.julia/v0.2/IJulia/src/kernel.jl\", \"{connection_file}\"\n", " ]\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.4.5 Enable Octave (Matlab) kernel" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "FIXME: add details" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 2. Installing extensions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are three collections of Calico notebook extensions that you might be interested in using. Below you can see demonstrations and installation instructions." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.1 Spell Checking" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Calico Spell Check extension checks the spelling of words in Markdown and Heading cells as you type. It is very fast, and expands to about 700k after download.\n", "\n", "Demonstration of use: " ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import IPython" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "IPython.display.YouTubeVideo(\"Km3AtRynWFQ\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.2 Document Tools" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Calico Document Tools extensions adds section moving, heading numbering, table of contents, and bibliography support.\n", "\n", "Demonstration of use: " ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "IPython.display.YouTubeVideo(\"YbM8rrj-Bms\")" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "downloading https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip to /tmp/tmpbji1iyly/calico-document-tools-1.0.zip\n", "extracting /tmp/tmpbji1iyly/calico-document-tools-1.0.zip to /home/dblank/.ipython/nbextensions\n" ] } ], "source": [ "!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.3 Cell Tools" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Calico Cell Tools extension adds tabbed Input/Output views to individual code cells, and two columns to individual cells.\n", "\n", "Demonstration of use: " ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "IPython.display.YouTubeVideo(\"WwoTzvOkEJQ\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.4 Easy install of notebook extensions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You could load these in just this notebook with the following:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "\n", "IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "\n", "IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Or, you could add these to your custom.js file so that they will be loaded always:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Overwriting /home/dblank/.ipython/profile_default/static/custom/custom.js\n" ] } ], "source": [ "%%file ~/.ipython/profile_default/static/custom/custom.js\n", "\n", "require([\"base/js/events\"], function (events) {\n", " events.on(\"app_initialized.NotebookApp\", function () {\n", " IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');\n", " // To turn off automatically creating closing parenthesis and bracket:\n", " IPython.CodeCell.options_default.cm_config[\"autoCloseBrackets\"] = \"\";\n", " });\n", "});\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 3. Learning about..." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3.1 Notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some resources for learning about how to edit Jupyter Notebooks:\n", "\n", "1. [Jupyter Notebook Users Manual](http://jupyter.cs.brynmawr.edu/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3.2 Python" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some good resources on learning Python in notebooks:\n", "\n", "1. http://mbakker7.github.io/exploratory_computing_with_python/" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 4. Known issues" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. You should be able to use any browser (previously one needed to use the Chrome browser); Fixed Sep 2, 2014.\n", "1. You can't actually log out\n", "1. You can't log in using https (secure connection)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", " \n", " comments powered by Disqus" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }